package com.sinan.core.connector.components;

/**
 * @author pengpei
 * @date 2025-06-10
 */
public class StandardPropertyValue implements PropertyValue {

    private final String rawValue;

    public StandardPropertyValue(final String rawValue) {
        this.rawValue = rawValue;
    }

    @Override
    public String getValue() {
        return rawValue;
    }

    @Override
    public Integer asInteger() {
        return Integer.parseInt(rawValue.trim());
    }

    @Override
    public Long asLong() {
        return Long.parseLong(rawValue.trim());
    }

    @Override
    public Double asDouble() {
        return Double.parseDouble(rawValue.trim());
    }
}
